package com.example.lib_patrol.add

import android.widget.CheckBox
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.lib_patrol.R

class PointAdapter : BaseQuickAdapter<PointEntity,BaseViewHolder>(R.layout.item_point) {
    override fun convert(holder: BaseViewHolder, item: PointEntity) {
        holder.setText(R.id.point_text,item.pointName)
        if (item.pChecked==true){
            holder.getView<CheckBox>(R.id.point_text).isChecked=true
        }else{
            holder.getView<CheckBox>(R.id.point_text).isChecked=false
        }
    }
}